﻿CREATE TABLE [dbo].[t_Borrower] (
    [ID]                       INT            IDENTITY (1, 1) NOT NULL,
    [FirstName]                VARCHAR (50)   NULL,
    [LastName]                 VARCHAR (50)   NULL,
    [SSN]                      VARCHAR (11)   NULL,
    [PhoneHome]                VARCHAR (50)   NULL,
    [GrossIncome]              INT            NULL,
    [NonEmploymentIncome]      SMALLINT       NULL,
    [NonEmploymentIncomeDesc]  NVARCHAR (128) NULL,
    [Assets]                   INT            NULL,
    [Liabilities]              INT            NULL,
    [OnTitle]                  BIT            NOT NULL,
    [MaritalStatusID]          TINYINT        NOT NULL,
    [DependentsCount]          TINYINT        NULL,
    [DependentsAges]           VARCHAR (25)   NULL,
    [Account]                  VARCHAR (50)   NULL,
    [INSStatusID]              TINYINT        NOT NULL,
    [DOBMonth]                 TINYINT        NULL,
    [DOBDay]                   TINYINT        NULL,
    [DOBYear]                  SMALLINT       NULL,
    [DOB]                      AS             ((((CONVERT([varchar],[DOBMonth],(0))+'/')+CONVERT([varchar],[DOBDay],(0)))+'/')+CONVERT([varchar],[DOBYear],(0))) PERSISTED,
    [InstantIDScore]           INT            NULL,
    [InstantIDHtml]            NVARCHAR (MAX) NULL,
    [PhoneCell]                VARCHAR (50)   NULL,
    [DriverLicense]            VARCHAR (50)   NULL,
    [NonEmploymentIncomePhone] VARCHAR (20)   NULL,
    [EMail]                    VARCHAR (128)  NULL,
    [Language]                 CHAR (2)       NULL,
    [FullName]                 AS             (isnull([FirstName]+' ','')+isnull([LastName],'')) PERSISTED NOT NULL,
    [DriverLicenseHtml]        NVARCHAR (MAX) NULL,
    [PhoneOther]               VARCHAR (16)   NULL
);

